package school.test;

import org.apache.ibatis.session.SqlSession;
import school.dao.StudentMapper;
import school.entity.Student;
import school.util.MyBatisUtil;

import java.util.List;
import java.util.Map;

public class Test {
    public static void main(String[] args) {

        SqlSession s= MyBatisUtil.get();
        StudentMapper mapper = s.getMapper(StudentMapper.class);
        List<Student> students = mapper.queryCols("qq","sname","qq","stuno","gradeid");
        for (Student s1:students)
            System.out.println(s1);
        System.out.println("---------------------------");
        String[] str = new String[]{"qq","wechat"};

        List<Map> maps = mapper.queryNiub("s_student", str);
        maps.forEach(System.out::println);


        MyBatisUtil.close(s);
    }


}
